Skip to content

feat(q7): add set_button_lights trait method - #843

Open
ximex wants to merge 3 commits into
Python-roborock:mainfrom
ximex:q7-set-button-light
Open

feat(q7): add set_button_lights trait method#843
ximex wants to merge 3 commits into
Python-roborock:mainfrom
ximex:q7-set-button-light

Conversation

@ximex

@ximex ximex commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds set_button_lights(enabled) to the Q7 (B01) trait, toggling the panel /
button lights via prop.set for RoborockB01Props.LIGHT_MODE (0/1).
Part of #739.

Verification

  • Getter + setter verified live on a Roborock Q7 L5+.
  • New parametrized unit test (on/off); ruff clean.

Copilot AI review requested due to automatic review settings June 3, 2026 22:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds support for toggling the Q7 button/panel light setting via the Q7 properties API, along with test coverage to validate the generated prop.set payload.

Changes:

  • Introduced set_button_light(enabled: bool) on Q7PropertiesApi to set RoborockB01Props.LIGHT_MODE to 0/1.
  • Added a parametrized test that validates the outgoing DPS payload for both enabled/disabled states.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/devices/traits/b01/q7/test_init.py Adds a new parametrized test asserting correct DPS payload when toggling button lights
roborock/devices/traits/b01/q7/init.py Adds set_button_light() method wiring to LIGHT_MODE via set_prop

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread roborock/devices/traits/b01/q7/__init__.py Outdated
Comment thread tests/devices/traits/b01/q7/test_init.py
@Lash-L
Lash-L marked this pull request as draft June 3, 2026 23:52
@ximex
ximex force-pushed the q7-set-button-light branch from cf37c6b to 277742c Compare June 21, 2026 19:55
@ximex
ximex marked this pull request as ready for review June 21, 2026 19:56
@ximex
ximex force-pushed the q7-set-button-light branch from 277742c to a6b920b Compare July 6, 2026 11:40
@allenporter
allenporter marked this pull request as draft August 15, 2026 17:12
@allenporter

Copy link
Copy Markdown
Contributor

Converting to draft given changes are requested. Mark ready for review when they've been addressed.

@ximex
ximex force-pushed the q7-set-button-light branch from a6b920b to f24ea7b Compare August 19, 2026 07:03
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@ximex
ximex force-pushed the q7-set-button-light branch from f24ea7b to a5c888e Compare August 26, 2026 17:59
@allenporter
allenporter marked this pull request as ready for review September 12, 2026 23:50
@allenporter

Copy link
Copy Markdown
Contributor

Converting to draft given changes are requested. Mark ready for review when they've been addressed.

I'm assuming its ready since the last force push? will review now. marking as ready for review.

@allenporter

Copy link
Copy Markdown
Contributor

Oh I see the naming discussion was not settled....

@allenporter allenporter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking request changes to help with tracking w.r.t. set_button_lights

The setting toggles multiple button lights, so the plural name matches
what the app calls it ("Button Lights"), as agreed in review.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@ximex ximex changed the title feat(q7): add set_button_light trait method feat(q7): add set_button_lights trait method Sep 13, 2026
@ximex
ximex requested a review from Lash-L September 13, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants